package client

import (
	"JudgeClient/global"
	"github.com/aliyun/aliyun-oss-go-sdk/oss"
	"net/http"
)

var JClient *Client

type Client struct {
	HttpCli *http.Client
	ossCli  *oss.Client
}

func NewClient() {
	conf := global.Conf.OssConf
	ossCli, err := oss.New(conf.EndPoint, conf.AK, conf.AKSecret)
	if err != nil {
		global.Logger.Errorf("oss init failed,err:%v", err)
	}
	JClient = &Client{
		HttpCli: http.DefaultClient,
		ossCli:  ossCli,
	}
}

// TODO
func (c *Client) DownLoadSubCode(sid int64, filePath string) {

}

// TODO
func (c *Client) DownLoadTestCase(pid int64, filePath string) {

}
